package service.impl;

import mapper.CollectionMapper;
import org.springframework.stereotype.Service;
import pojo.Collectiona;
import service.CollectionService;

import javax.annotation.Resource;
import java.util.List;

@Service("collectionService")
public class CollectionServiceImpl implements CollectionService {
    @Resource
    private CollectionMapper collectionMapper;

    @Override
    public int insert(Collectiona collection) {
        return collectionMapper.insert(collection);
    }

    @Override
    public int delete(int collectionid) {
        return collectionMapper.delete(collectionid);
    }

    @Override
    public Collectiona getIsCollection(String userid, String blogid) {
        return collectionMapper.getIsCollection(userid,blogid);
    }

    @Override
    public List<Collectiona> getCollectbyid(String userid) {
        return collectionMapper.getCollectbyid(userid);
    }

}
